import { Typography, List,  Radio } from 'antd'
import prices from '../../helpers/price'
const { Title } = Typography


function FilterByPrice({handleFilters}) {
  const onChange = ev =>{
    handleFilters(ev.target.value)
  }
  return (
    <>
      <Title level={5}>按照价格进行筛选</Title>
      <Radio.Group onChange={onChange}>
        <List
          dataSource={prices}
          renderItem={item => (
            <List.Item>
              <Radio value={item.array}>{item.name}</Radio>
            </List.Item>
          )}
        />
      </Radio.Group>

    </>
  )
}

export default FilterByPrice